package ch.bfh.mobicompsoda2.sms_sender;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import ch.bfh.mobicompsoda2.sms_sender.sender_service.SODA_Send_SMS_Service;

public class SendSMSBroadcastReceiver extends BroadcastReceiver {

    private static final String TAG = SendSMSBroadcastReceiver.class.getName();

    @Override
    public void onReceive(Context context, Intent intent) {

        if (intent.getAction().equals("SEND_SODA_SMS")) {
            if (intent.getExtras() != null) {
                intent.setClass(context, SODA_Send_SMS_Service.class);
                Log.d(TAG, "Send a SODA_SMS");
                context.startService(intent);
            }
        }

    }

}
